<!-- 生产订单计划分析 -->
<template>
  <div class="planOrderMerge">
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane :label="$i18n.t('planOrderMerge.report')" name="1">
        <!-- 出库任务 -->
        <!-- @handerLink="handerLink" -->
        <planOrderReport :typeInto="1"></planOrderReport>
      </el-tab-pane>
      <el-tab-pane :label="$i18n.t('planOrderMerge.graphTrend')" name="2">
        <div>
          <graphTrend ref="graphTrend"></graphTrend>
        </div>
        <!-- 出库明细 -->
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
//例如：import 《组件名称》 from '《组件路径》';
import planOrderReport from "./planOrderReport/index";
import graphTrend from "./graphTrend/index";
export default {
  name: "processAnomalyAnalysis",
  //import引入的组件需要注入到对象中才能使用
  components: { planOrderReport, graphTrend },
  data() {
    //这里存放数据
    return {
      activeName: "1",
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    // 单据点击回调
    // handerLink(data) {
    //   this.$refs.detail.otherParams = data;
    //   this.activeName = "2";
    //   this.$nextTick(() => {
    //     this.$refs.detail.refresh();
    //   });
    // },
    // 上方tbas切换事件
    handleClick() {
      this.$nextTick(() => {
        if (this.activeName == "2") {
          // 强制赋值搜索,解决,搜索框样式错乱bug
          // let { searchConfig } = this.$refs.detail
          // this.$refs.detail.$refs.eleTable.$refs.eleFormSearch.getFormConfig(searchConfig)
          this.$refs.graphTrend.searchRecord(1);
        }
      });
    },
  },
};
</script>
<style scoped lang="scss"></style>
